package com.longshihan.testdagger;

import android.content.Context;

import dagger.Module;
import dagger.Provides;
import okhttp3.OkHttpClient;

/**
 * Created by longshihan on 2017/7/2.
 * 真正的实例
 */

@Module(includes = {HttpModule.class})
public class UserModele {

    private Context mContext;



    public UserModele(Context context) {
        this.mContext = context;
    }


    @Provides
    public UserStore privodeUserStore() {
        return new UserStore(mContext);
    }

    @Provides
    public UserManager provideUserManager(APiService apiService, UserStore userStore) {
        return new UserManager(apiService, userStore);
    }

    //@Test
    @Provides
    public APiService provideApiServiceFoeDev(OkHttpClient okHttpClient) {
        APiService aPiService=new APiService(okHttpClient);
        return aPiService;
    }

   /* @Named("release")
    @Provides
    public APiService provideApiServivceForRelease(OkHttpClient okHttpClient){
        APiService aPiService=new APiService(okHttpClient);
        return aPiService;
    }*/

}
